/*
 * @Author: your name
 * @Date: 2021-11-15 13:51:15
 * @LastEditTime: 2021-11-15 14:13:46
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /a1902-apractical2/my-react-dome/src/store/reducer.js
 */

import * as stypes from './actions'

const initialState = {
    name: 'zxd',
}

export default (state = initialState, { type, payload }) => {
    switch (type) {
    case stypes.SET_NAME:
        return {...state, name: '祝'}
    case stypes.ASYNC_SET_NAME:
        return {...state, name: '哈哈哈，我变了'}
    default:
        return {...state}
    }
}
